package com.uum.auth.api;

import com.uum.auth.api.fallback.LoginFallbackClient;
import com.uum.common.core.result.Result;
import com.uum.web.config.FeignErrorConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;

@FeignClient(value = "uum-auth", contextId = "login-client",fallbackFactory = LoginFallbackClient.class,configuration = {FeignErrorConfig.class})
public interface LoginFeignClient {

    @PostMapping("/oauth/token")
    Result postAccessToken(@RequestParam Map<String, String> parameters);
}
